#ifndef VENUS_RAY_MARCHING_VOLUME_RENDERER_H
#define VENUS_RAY_MARCHING_VOLUME_RENDERER_H

#include "volume_buffer.h"

namespace venus {
class VolumeRenderer  {
public:
  VolumeRenderer(CGcontext cg_context, VolumeBuffer *volume);
  ~VolumeRenderer();
  void Render();
  void set_volume(VolumeBuffer *volume) { volume_ = volume; }
  void set_density(float x) { density_ = x; }
  void set_brightness(float x) { brightness_ = x; }
private:
  void LoadPrograms();
  VolumeBuffer *volume_;
  CGcontext cg_context_;
  ProgramCG *raymarch_vprog_, *raymarch_fprog_;
  CGparameter density_param_, brightness_param_;
  float density_, brightness_;
};
} // namespace venus

#endif // VENUS_RAY_MARCHING_VOLUME_RENDERER_H
